{% extends "index.html" %}

{% block inline_navi %}
<a href="/">Home</a>&nbsp;>&nbsp;<a href="{% url filemanagement.views.index %}">Downloads</a>
{% if breadcrumbs %}
    {% for breadcrumb in breadcrumbs %}
        &nbsp;>&nbsp;<a href="{% url filemanagement.views.index breadcrumb.path %}">{{ breadcrumb }}</a>
    {% endfor %}
{% endif %}
{% endblock %}

{% block content %}
<h1>Downloads</h1>

<div class="downloads">
    <table>
        <tr>
            <th>Dateiname</th>
            <th>zuletzt geändert</th>
        </tr>
        {% if dirs %}
            {% for dir in dirs %}
                <tr class="downloads_dir">
                    <td><a href="{% url filemanagement.views.index dir.path %}">{{ dir }}</a></td>
                    <td><a href="{% url filemanagement.views.index dir.path %}">{{ dir.lastmodified }}</a></td>
                </tr>
            {% endfor %}
        {% endif %}
        {% if files %}
            {% for file in files %}
                <tr class="downloads_file">
                    <td><a href="{% url filemanagement.views.index file.path %}">{{ file }}</a></td>
                    <td><a href="{% url filemanagement.views.index file.path %}">{{ file.lastmodified }}</a></td>
                </tr>
            {% endfor %}
        {% endif %}
    <table>
</div>
{% endblock %}
